import request from "@/utils/request.js"

export const insertCartAPI=({skuId,count})=>{
    return request({
        method:'POST',
        url:'/member/cart',
        data:{
            skuId,
            count
        }
    })
}
/**
 * 获取最新购物车列表
 * @returns {*}
 */
export const findNewCartListAPI=()=>{
    return request({
        method:'GET',
        url:'/member/cart'
    })
}

export const delCartAPI=(ids)=>{
    return request({
        method:'DELETE',
        url:'/member/cart',
        data:{
            ids
        }
    })
}

export const mergeCartAPI= (data)=>{
    return request({
        method:'POST',
        url:'/member/cart/merge',
        data
    })
}